package com.simon.hse.adapter;


import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import java.util.List;

/**
 * 首页Viewpage适配器
 */
@SuppressWarnings("all")
public class VpHomeAdapter extends FragmentPagerAdapter {
    private List<Fragment> mListFragments;

    public VpHomeAdapter(FragmentManager fm, List<Fragment> mListFragments) {
        super(fm);
        this.mListFragments = mListFragments;
    }

    @Override
    public Fragment getItem(int position) {
        return mListFragments.get(position);
    }

    @Override
    public int getCount() {
        return mListFragments != null ? mListFragments.size() : 0;
    }
}
